instantiate
( service in module AUTO
)
Create a new instance of JS type. The method takes a constructor function invokes the new operator and supplies all of the arguments to the constructor function as specified by the constructor annotation.
Type – {function} –
Annotated constructor function.
locals(optional) – {Object=} –
Optional object. If preset then any argument names are read from this object first, before
the $injector
is consulted.
{Object}
– new instance of Type
.